<template>
  <div v-loading.fullscreen.lock="fullscreenLoading">
  </div>
</template>

<script>
import axios from "axios";
export default {
  methods: { },
  created() {
    this.fullscreenLoading = true;

    let loginCode = this.$cookies.get("loginCode");
    let username = this.$cookies.get("username");

    if (loginCode !== null) {
      axios
        .get("/api/loginVerification", { params: { username, loginCode }})
        .then((res) => {
          if (res.data === loginCode) {
            this.$router.push("/" + res.data + "/home");
          }
        });
    }
    else this.$router.push("/Login");
  }
};
</script>

<style lang="stylus" scoped></style>